home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1994 March / Internet Info CD-ROM (Walnut Creek) (March 1994).iso / networking / applic / ntp / doc / ccr.txt < prev    next >
Encoding:
Text File  |  1991-09-29  |  45.5 KB  |  876 lines

  1. @TITLE = On the Accuracy and Stability of Clocks Synchronized by the
  2. Network Time Protocol in the Internet System<$FReprinted from: Mills,
  3. D.L. On the accuracy and stability of clocks synchronized by the Network
  4. Time Protocol in the Internet system. ACM Computer Communication Review
  5. 20, 1 (January 1990), 65-75.> <$FSponsored by: Defense Advanced Research
  6. Projects Agency contract number N00140-87-C-8901 and by National Science
  7. Foundation grant number NCR-89-13623.>
  8.  
  9. @AUTHOR = David L. Mills
  10. Electrical Engineering Department
  11. University of Delaware
  12.  
  13. @AUTHOR = Abstract
  14.  
  15. @ABSTRACT = This paper describes a series of experiments involving over
  16. 100,000 hosts of the Internet system and located in the U.S., Europe and
  17. the Pacific. The experiments are designed to evaluate the availability,
  18. accuracy and reliability of international standard time distribution
  19. using the Internet and the Network Time Protocol (NTP), which has been
  20. designated an Internet Standard protocol. NTP is designed specifically
  21. for use in a large, diverse internet system operating at speeds from
  22. mundane to lightwave. In NTP a distributed subnet of time servers
  23. operating in a self-organizing, hierarchical, master-slave configuration
  24. exchange precision timestamps in order to synchronize host clocks to
  25. each other and national time standards via wire or radio.
  26.  
  27. @ABSTRACT = The experiments are designed to locate Internet hosts and
  28. gateways that provide time by one of three time distribution protocols
  29. and evaluate the accuracy of their indications. For those hosts that
  30. support NTP, the experiments determine the distribution of errors and
  31. other statistics over paths spanning major portions of the globe.
  32. Finally, the experiments evaluate the accuracy and reliability of
  33. precision timekeeping using NTP and typical Internet paths involving
  34. ARPANET, NSFNET and regional networks. The experiments demonstrate that
  35. timekeeping throughout most portions of the Internet can be maintained
  36. to an accuracy of a few tens of milliseconds and a stability of a few
  37. milliseconds per day, even in cases of failure or disruption of clocks,
  38. time servers or networks.
  39.  
  40. Keywords: network clock synchronization, standard-time distribution,
  41. performance evaluation, internet protocol.
  42.  
  43. @HEAD LEVEL 1 =  Introduction
  44.  
  45. How do hosts and gateways in a large, dispersed networking community
  46. know what time it is? How accurate are their clocks? In a 1988 survey
  47. involving 5,722 hosts and gateways of the Internet system [14], 1158
  48. provided their local time via the network. Sixty percent of the replies
  49. had errors greater than one minute, while ten percent had errors greater
  50. than 13 minutes. A few had errors as much as two years. Most host clocks
  51. are set by eyeball-and-wristwatch to within a minute or two and rarely
  52. checked after that. Many of these are maintained by some sort of
  53. battery-backed clock/calender device using a room-temperature quartz
  54. oscillator that may drift seconds per day and can go for weeks between
  55. manual corrections. For many applications, especially those designed to
  56. operate in a distributed internet environment, much greater accuracy,
  57. stability and reliability are required.
  58.  
  59. The Network Time Protocol (NTP) is designed to distribute standard time
  60. using the hosts and gateways of the Internet system. The Internet
  61. consists of over 100,000 hosts on over 800 packet-switching networks
  62. interconnected by a comparable number of gateways. While the Internet
  63. backbone networks and gateways are engineered and managed for good
  64. service, operating speeds and service reliabilities vary considerably
  65. throughout the regional and campus networks of the system. This places
  66. severe demands on NTP, which must deliver accurate, stable and reliable
  67. standard time throughout the system, in spite of component failures,
  68. service disruptions and possibly mis-engineered implementations.
  69.  
  70. NTP and its forebears were developed and tested on PDP11 computers and
  71. the Fuzzball operating system, which was designed specifically for
  72. timekeeping precisions of a millisecond or better [15]. An
  73. implementation of NTP as a Unix 4.3bsd system daemon was built by
  74. Michael Petry and Louis Mamakos at the University of Maryland. A
  75. special-purpose hardware/software implementation of NTP was built be
  76. Dennis Ferguson at the University of Toronto. At least 16 NTP primary
  77. time servers are presently synchronized by radio or satellite to
  78. national time standards in the U.S., Canada and the U.K. About half of
  79. these are connected directly to backbone networks and are intended for
  80. ubiquitous access, while the remainder are connected to regional and
  81. campus networks and intended for local distribution. It is estimated
  82. that there are well over 2000 secondary servers in North America, Europe
  83. and the Pacific synchronized by NTP directly or indirectly to these
  84. primary servers.
  85.  
  86. This paper describes several comprehensive experiments designed to
  87. evaluate the availability, accuracy, stability and reliability of
  88. standard time distribution using NTP and the hosts and gateways of the
  89. Internet. The first is designed to locate hosts that support at least
  90. one of three time protocols specified for use in the Internet, including
  91. NTP. Since Internet hosts are not centrally administered and network
  92. time is not a required service in the TCP/IP protocol suite,
  93. experimental determination is the only practical way to estimate the
  94. penetration of time service in the Internet. The remaining experiments
  95. use only NTP and are designed to assess the nominals and extremes of
  96. various errors that occur in regular system operation, including those
  97. due to the network paths between the servers and the radio propagation
  98. paths to the source of synchronization, as well as the intrinsic
  99. stabilities of the various radio clocks and local clocks in the system.
  100.  
  101. This paper does not describe in detail the architecture or protocols of
  102. NTP, nor does it present the rationale for the particular choice of
  103. synchronization method and statistical processing algorithms. Further
  104. information on the background, model and algorithms can be found in
  105. [18], while details of the latest NTP protocol specification can be
  106. found in [16]. This paper itself is an edited and expanded version of
  107. [17].
  108.  
  109. @HEAD LEVEL 2 =  Standard Time and Frequency Dissemination
  110.  
  111. In order that precision time and frequency can be coordinated throughout
  112. the world, national administrations operate primary time and frequency
  113. standards and maintain Coordinated Universal Time (UTC) by observing
  114. various radio broadcasts and through occasional use of portable atomic
  115. clocks. A primary frequency standard is an oscillator that can maintain
  116. extremely precise frequency relative to a physical phenomenon, such as a
  117. transition in the orbital states of an electron. Presently available
  118. atomic oscillators are based on the transitions of the hydrogen, cesium
  119. and rubidium atoms and are capable of maintaining fractional frequency
  120. stability to 10-13 and time to 100 ns when operated in multiple
  121. ensembles at various national standards laboratories.
  122.  
  123. The U.S. National Institute of Standards and Technology (NIST - formerly
  124. National Bureau of Standards) operates radio broadcast services for the
  125. dissemination of standard time [21]. These include short-wave
  126. transmissions from stations WWV at Fort Collins, CO, and WWVH at Kauai,
  127. HI, long-wave transmissions from WWVB, also at Fort Collins, and
  128. satellite transmissions from the Geosynchronous Orbiting Environmental
  129. Satellite (GOES). These transmissions and those of some other countries,
  130. including Canada and the U.K., include a timecode modulation which can
  131. be decoded by special-purpose radio receivers and interfaced to an NTP
  132. time server.
  133. Using high-frequency transmissions, reliable frequency comparisons can
  134. be made to the order of 10-7, but time accuracies are limited to the
  135. order of a millisecond [5]. Using long-wave transmissions and
  136. appropriate receiving and averaging techniques and corrections for
  137. diurnal and seasonal propagation effects, frequency comparisons to
  138. within 10-11 are possible and time accuracies of from a few to 50
  139. microseconds can be obtained. Using GOES the accuracy depends on an
  140. accurate ephemeris and correction factors, but is generally of the same
  141. order as WWVB. Other systems intended primarily for navigation,
  142. including LORAN-C [8], Global Positioning System (GPS) [4], OMEGA [25],
  143. and various very-low-frequency communication stations in principle can
  144. be used for very precise time and frequency transfer on a global scale;
  145. however, these systems do not provide timecodes including time-of-day or
  146. day-of-year information.
  147.  
  148. @HEAD LEVEL 2 =  The Network Time Protocol
  149.  
  150. An accurate, reliable time distribution protocol must provide the
  151. following:
  152.  
  153. @INDENT HEAD = 1.
  154.  
  155. @INDENT = The primary time reference source(s) must be synchronized to
  156. national standards by wire, radio or portable clock. The system of time
  157. servers and clients must deliver continuous local time based on UTC,
  158. even when leap seconds are inserted in the UTC timescale.
  159.  
  160. @INDENT HEAD = 2.
  161.  
  162. @INDENT = The time servers must provide accurate, stable and precise
  163. time, even with relatively large statistical delays on the transmission
  164. paths. This requires careful design of the data smoothing and
  165. deglitching algorithms, as well as an extremely stable local clock
  166. oscillator and synchronization mechanism.
  167.  
  168. @INDENT HEAD = 3.
  169.  
  170. @INDENT = The synchronization subnet must be reliable and survivable,
  171. even under unstable conditions and where connectivity may be lost for
  172. periods extending to days. This requires redundant time servers and
  173. diverse transmission paths, as well as a dynamically reconfigurable
  174. subnet architecture.
  175.  
  176. @INDENT HEAD = 4.
  177.  
  178. @INDENT = The synchronization protocol must operate continuously and
  179. provide update information at rates sufficient to compensate for the
  180. expected wander of the room-temperature quartz oscillators commonly used
  181. in ordinary computer systems. It must operate efficiently with large
  182. numbers of time servers and clients in continuous-polled and procedure-
  183. call modes and in multicast and point-to-point configurations.
  184.  
  185. @INDENT HEAD = 5.
  186.  
  187. @INDENT = The system must operate with a spectrum of systems ranging
  188. from personal workstations to supercomputers, but make minimal demands
  189. on the operating system and supporting services. Time server software
  190. and especially client software must be easily installed and configured.
  191.  
  192. In addition to the above, and in common with other promiscuously
  193. distributed services, the system must include generic protection against
  194. accidental or willful intrusion and provide a comprehensive interface
  195. for network management. In NTP address filtering is used for access
  196. control, while encrypted checksums are used for authentication [16].
  197. Network management presently uses a proprietary protocol with provisions
  198. to migrate to standard protocols where available.
  199. In NTP one or more primary time servers synchronize directly to external
  200. reference sources such as radio clocks. Secondary time servers
  201. synchronize to the primary servers and others in a configured subnet of
  202. NTP servers. Subnet servers calculate local clock offsets and delays
  203. between them using timestamps with 200 picosecond resolution exchanged
  204. at intervals up to about 17 minutes. As explained in [16], the protocol
  205. uses a distributed Bellman-Ford algorithm [3] to construct minimum-
  206. weight spanning trees within the subnet based on hierarchical level
  207. (stratum) and total synchronization path delay to the primary servers.
  208.  
  209. A typical NTP synchronization subnet is shown in Figure 1a<$&fig12>, in
  210. which the nodes represent subnet servers and normal stratum number and
  211. the heavy lines the active synchronization paths. The light lines
  212. represent backup synchronization paths where timing information is
  213. exchanged, but not necessarily used to synchronize the local clock.
  214. Figure 1b shows the same subnet, but with the line marked x out of
  215. service. The subnet has reconfigured itself automatically to use backup
  216. paths, with the result that one of the servers has dropped from stratum
  217. 2 to stratum 3.
  218.  
  219. Besides NTP, there are several protocols designed to distribute time in
  220. local-area networks, including the DAYTIME protocol [22], TIME Protocol
  221. [23], ICMP Timestamp message [7] and IP Timestamp option [24]. The DCN
  222. routing protocol incorporates time synchronization directly into the
  223. routing protocol using algorithms similar to NTP [11]. The Unix 4.3bsd
  224. time daemon timed uses a single master-time daemon to measure offsets of
  225. a number of slave hosts and send periodic corrections to them [9].
  226. However, these protocols do not include engineered algorithms to
  227. compensate for the effects of statistical delay variations encountered
  228. in wide-area networks and are unsuitable for precision time distribution
  229. throughout the Internet.
  230.  
  231. @HEAD LEVEL 2 =  Determining Time and Frequency
  232.  
  233. In this paper to synchronize frequency means to adjust the clocks in the
  234. network to run at the same frequency, to synchronize time means to set
  235. the clocks so that all agree at a particular epoch with respect to UTC,
  236. as provided by national standards, and to synchronize clocks means to
  237. synchronize them in both frequency and time. A clock synchronization
  238. subnet operates by measuring clock offsets between the various servers
  239. in the subnet and so is vulnerable to statistical delay variations on
  240. the various transmission paths between them. In the Internet the paths
  241. involved can have wide variations in delay and reliability, while the
  242. routing algorithms can select landline or satellite paths, public
  243. network or dedicated links or even suspend service without prior notice.
  244.  
  245. In statistically noisy internets accurate time synchronization requires
  246. carefully engineered filtering and selection algorithms and the use of
  247. redundant resources and diverse transmission paths, while stable
  248. frequency synchronization requires finely tuned local clock tracking
  249. loops and multiple offset comparisons over relatively long periods of
  250. time. For instance, while only a few comparisons are usually adequate to
  251. resolve local time for an Internet host to within a few tens of
  252. milliseconds, dozens of measurements over many hours are required to
  253. achieve a frequency stability of a few tens of milliseconds per day and
  254. hundreds of measurements over many days to achieve the ultimate accuracy
  255. of a millisecond per day.
  256.  
  257. Figure 2<$&fig11> shows the overall organization of the NTP time server
  258. model. Timestamps exchanged with possibly many other servers are used to
  259. determine individual roundtrip delays and clock offsets relative to each
  260. server as follows. Number the times of sending and receiving NTP
  261. messages as shown below and let i be an even integer.
  262.  
  263. <$&fig[^]>Then <$Et sub {i-3},~t sub{i-2},~t sub {i-1},~t> are the
  264. values of the four most recent timestamps as shown. The roundtrip delay
  265. di and clock offset ci of the receiving server relative to the sending
  266. server is:
  267.  
  268. @CENTER = <$Ed sub i~=~(t sub i~-~t sub {i - 3} )~-~(t sub {i - 1}~-~t
  269. sub {i - 2} )> ,
  270. <$Ec sub i~=~{(t sub {i - 2}~-~t sub {i-3})~+~(t sub {i-1}~-~t sub i ) }
  271. over 2> .
  272.  
  273. This method amounts to a continuously sampled, returnable-time system,
  274. which is used in some digital telephone networks [19]. Among the
  275. advantages are that the transmitted time and received order of the
  276. messages are unimportant and that reliable delivery is not required.
  277. Obviously, the accuracies achievable depend upon the statistical
  278. properties of the outbound and inbound data paths. Further analysis and
  279. experimental results bearing on this issue can be found in [6], [12] and
  280. [13].
  281.  
  282. As shown in Figure 2, the computed offsets are first filtered to reduce
  283. incidental noise and then evaluated to select the most accurate and
  284. reliable subset among all available servers. The filtered offsets from
  285. this subset are first combined using a weighted average and then
  286. processed by a phase-locked loop (PLL). In the PLL the phase detector
  287. (PD) produces a correction term, which is processed by the loop filter
  288. to control the local clock, which functions as a voltage-controlled
  289. oscillator (VCO). Further discussion on these components is given in
  290. subsequent sections.
  291.  
  292. @HEAD LEVEL 1 =  Discovering Internet Timetellers
  293.  
  294. An experiment designed to discover Internet time server hosts and
  295. evaluate the quality of their indications was conducted over a nine-day
  296. interval in August 1989. This experiment is an update of previous
  297. experiments conducted in 1985 [13] and early 1988 [14]. It involved
  298. sending time-request messages in each of three time distribution
  299. protocols: ICMP Timestamp, TIME and NTP, to every Internet address that
  300. could reasonably be associated with a working host. Previously, lists of
  301. such addresses were derived from the Internet host table maintained by
  302. the Network Information Center (NIC), which contained 6382 distinct host
  303. and gateway addresses as of August 1989.
  304.  
  305. With the proliferation of the Internet domain-name system used to
  306. resolve host addresses from host names [20], the NIC host table has
  307. become increasingly inadequate as a discovery vehicle for working host
  308. addresses. In a comprehensive survey of the domain-name system, Mark
  309. Lotter of SRI International recently compiled a revised host table of
  310. 137,484 entries. Each entry includes two lists, one containing the
  311. Internet addresses of a single host or gateway and the other containing
  312. its associated domain names. For the experiment this 9.4-megabyte table
  313. was sorted by address and extraneous information deleted, such as
  314. entries containing missing or invalid addresses, to produce a control
  315. file of 112,370 entries.
  316.  
  317. The experiment itself was conducted with the aid of the control file and
  318. a specially constructed experiment program written for the Fuzzball
  319. operating system [15]. The data were collected using experiment hosts
  320. located at the University of Delaware and connected to the University of
  321. Delaware campus network and SURA regional network. The experiment
  322. program reads each entry from the control file in turn and sends time-
  323. request messages to the first Internet address found. If no reply is
  324. received after one second, the program tries again. If no reply is
  325. received after an additional second, the program abandons the attempt
  326. and moves to the next entry in the control file. The program accumulates
  327. error messages and sample data for up to eight samples in each of the
  328. three time protocols. It abandons a host upon receipt of an ICMP error
  329. message [7] and abandons further hosts on the same network upon receipt
  330. of an ICMP net-unreachable message. Using this procedure, attempts were
  331. made to read the clock for 107,799 distinct host addresses.
  332.  
  333. In the experiment the clock offsets were measured for each of the three
  334. time protocols relative to the local clock used on the experiment host,
  335. which is synchronized via radio to NBS standards to within a few
  336. milliseconds. The maximum, minimum and mean offset for up to eight
  337. replies for each protocol was computed and written to a statistics file,
  338. which contains valid responses, ICMP error messages of various kinds,
  339. timeout messages and other error indications. In the tabulation shown in
  340. Table 1<$&tab1> the timeout column shows the number of occasions when no
  341. reply was received, while the error column shows the error messages
  342. received, including ICMP time-exceeded, ICMP host-unreachable and ICMP
  343. port-unreachable messages. The unknown column tabulates occurrences of a
  344. specially marked ICMP Timestamp reply that indicates the host supports
  345. the protocol, but does not have a synchronized time-of-day clock.
  346.  
  347. In summary, of the 107,799 host addresses surveyed, 94,260 resulted in
  348. some kind of entry in the statistics file. Of these, 20,758 hosts (22%)
  349. were successful in returning an apparently valid indication. Note that
  350. there may be more than one attempt to read a host clock and that some
  351. clocks were read using more than one protocol. The valid entries were
  352. then processed to delete all except the first entry received for each
  353. address and protocol. In addition, if a host replied to an NTP request,
  354. all other entries for that host were deleted, while, if a host did not
  355. reply to an NTP request, but did for a TIME request, all other entries
  356. for that host were deleted. This results in a list of 8455 hosts which
  357. provided an apparently valid time indication, including 3694 for ICMP
  358. Timestamp, 7666 for TIME and 789 for NTP.
  359.  
  360. In order to discover as many NTP hosts as possible, the NTP
  361. synchronization subnet operating in the Internet was explored starting
  362. from the known primary servers using special monitoring programs
  363. designed for this purpose. This search, together with those discovered
  364. using the domain-name system and additional information gathered by
  365. other means, resulted in a total of about 990 NTP hosts. These hosts
  366. were then surveyed again, while keeping track of ancillary information
  367. to determine whether they were synchronized and operating correctly.
  368. This resulted in a list of 946 hosts apparently synchronized to the NTP
  369. subnet and operating correctly.
  370.  
  371. The methodology used here can miss a sizeable number of NTP hosts, such
  372. as personal computers, hosts not listed in the NIC or domain-name
  373. database and implementations that do not respond to the monitoring
  374. programs. In fact, extrapolating from data assembled from personal
  375. communications, the grand search described here discovered much less
  376. than half of the NTP-speaking hosts.
  377.  
  378. @HEAD LEVEL 2 =  Evaluation of Timekeeping Accuracy by Protocol
  379.  
  380. In evaluating the quality of standard time distribution it is important
  381. to understand the effects of errors on the applications using the
  382. service. For many applications the maximum error under all conditions is
  383. more important than the mean error under controlled conditions. In these
  384. applications conventional statistics such as mean and variance are
  385. inappropriate. A useful statistic has been found to be the error
  386. distribution plotted on log-log axes and showing the probability P(x>>a)
  387. that a sample x from the population exceeds the value a on the x axis.
  388. Figure 3<$&fig2> shows the error distributions for each of the three
  389. time protocols included in the survey. The top line in Figure 3 is for
  390. ICMP Timestamp, the next down is for TIME and the bottom is for NTP.
  391.  
  392. The graphs shown in Figure 3 suggest several conclusions. First, the
  393. time accuracy of the various hosts varies dramatically over at least
  394. nine decades from milliseconds to over 11 days. To be sure, not many
  395. hosts showed very large errors and there is cause to believe these hosts
  396. either were never synchronized or were operating improperly. In the case
  397. of NTP, for example, which is designed expressly for time
  398. synchronization, eight hosts showed errors above ten seconds, a value
  399. considered barely credible for a host correctly synchronized by NTP in
  400. the Internet. It is very likely that some or all of these hosts,
  401. representing about one percent of the total NTP population, were using
  402. an old NTP implementation with known bugs. On the other hand, one
  403. percent of the ICMP Timestamp hosts show errors greater than a day,
  404. while one percent of TIME hosts show errors greater than a few hours.
  405. Clearly, at least on some machines running the latter two protocols,
  406. time is not considered a cherished service.
  407.  
  408. At the other end of the scale, Figure 3 suggests that at least 30
  409. percent of the hosts in all three protocols make some attempt to
  410. maintain accurate time to about 30 ms with NTP, a minute with TIME and a
  411. couple of minutes with ICMP Timestamp. Between this regime and the one-
  412. percent regime the accuracies deteriorate; however, in general, NTP
  413. hosts maintain time about a thousand times more accurate than either of
  414. the other two protocols.
  415.  
  416. @HEAD LEVEL 1 =  NTP Performance Analysis and Measurement
  417.  
  418. The above experiments were designed to assess the performance of all
  419. time servers that could be found in the Internet, regardless of
  420. protocol, system management discipline or protocol conformance. The
  421. remaining experiments described in this paper involve only the NTP
  422. protocol and the algorithms used in NTP implementations to synchronize
  423. the local clock.
  424.  
  425. @HEAD LEVEL 2 =  Accuracy and Stability of NTP Primary Time Servers
  426.  
  427. In this experiment a number of NTP primary time servers was surveyed for
  428. overall accuracy and stability. Primary servers are synchronized by
  429. radio or satellite to national standards and located at or near points
  430. of entry to national and international backbone networks. Since they are
  431. monitored and maintained on a regular basis, their performance can be
  432. taken as representative of a managed system.
  433.  
  434. The experiment operated over a two-week period in August 1989 using
  435. paths between six primary servers on the east coast, west coast and
  436. midwest. All measurements were made from an experiment host located at
  437. the University of Delaware. Most of the paths involve links operating at
  438. 1.5 Mbps or higher, although there are over a dozen links on some paths
  439. and some lower speed links are in use. Samples of roundtrip delay and
  440. clock offset were collected at intervals from one to 17 minutes on all
  441. six paths and the data recorded in files for later analysis.
  442.  
  443. Table 2<$&tab2> shows the results of the survey, which involved about
  444. 33,000 samples. For each server the name, synchronization source, number
  445. of gateway/router hops and number of samples are shown. The offset and
  446. delay columns show the sample medians for these quantities in
  447. milliseconds. Note that the number of samples collected depends on
  448. whether the server is selected for clock synchronization, as determined
  449. by the NTP clock-selection algorithm described in [16].
  450.  
  451. As in previous surveys of this type, statistics based on the sample
  452. median yield more reliable results than those based on the sample mean.
  453. However, statistics based on the trimmed mean (also called Fault-
  454. Tolerant Average [10]) with 25 percent of the samples removed are within
  455. a millisecond of the values shown in Table 2.
  456.  
  457. The residual offset errors apparent in Table 2 can be traced to subtle
  458. asymmetries in path routing and network/gateway configurations. If these
  459. can be calibrated, perhaps using a portable atomic clock, reliable time
  460. transfer over the Internet should be possible within a millisecond or
  461. two if measurements are made over periods consistent with the two-week
  462. experiment. Assuming successive offset measurements can be made with
  463. confidence to this order, frequency transfer over the Internet could in
  464. principle be determined to the order of 10-9 in two weeks.
  465.  
  466. In order to test this conjecture an experiment was designed to determine
  467. the stability of the apparent timescale constructed from the first-order
  468. offset differences produced in an experiment similar to that which
  469. produced Table 2. This is similar to the approach described in [1] to
  470. analyze the intrinsic characteristics of a precision oscillator. In the
  471. month-long experiment, measured offsets were filtered by the algorithm
  472. described in the next section. The resulting samples were averaged at
  473. given intervals from about a minute to about ten days. The difference in
  474. offsets at the beginning and end of the interval divided by the duration
  475. of the interval represents the frequency during that interval. The
  476. standard deviation <$Esigma ( tau )> calculated from the sample
  477. population for each given interval <$Etau> is shown in Figure
  478. 4<$&fig10>. Among the primary servers listed in Table 2, the lower curve
  479. represents the "best" one (UMD) and the upper curve the "worst" one
  480. (ISI).
  481.  
  482. The results show that, even for the best server and using carefully
  483. filtered data averaged over periods in the order of days, reliable
  484. stabilities approaching .01 parts per million (ppm) - about a
  485. millisecond per day - are difficult to achieve without further
  486. processing. Techniques which can approach this goal will be presented
  487. later in this paper.
  488.  
  489. @HEAD LEVEL 2 =  Effects Due to Filtering Algorithm
  490.  
  491. In order to more completely assess the accuracy and reliability that
  492. clocks can be synchronized using NTP and the Internet, the paths
  493. illustrated in Table 2 were carefully measured in several surveys
  494. conducted over a period of 18 months. Each survey used up to six time
  495. servers and lasted up to two weeks. A typical survey involves the path
  496. between experiment hosts at the University of Delaware and USC
  497. Information Sciences Institute, located near Los Angeles, over a complex
  498. path of up to twelve network hops involving NSFNET, ARPANET and several
  499. other regional and campus nets. This path was purposely selected as
  500. among the statistically noisiest in order to determine how well clocks
  501. can be synchronized under adverse conditions.
  502.  
  503. A number of algorithms for deglitching and filtering time-offset data
  504. are summarized in [12] and [18]. Experiments during the development of
  505. NTP Version 2 have produced an algorithm which provides high accuracy
  506. together with a low computational burden. The key to the new algorithm
  507. becomes evident through an examination of scatter diagrams plotting
  508. clock offset versus roundtrip delay. Without making any assumptions
  509. about the distributions of queueing and transmission delays on either
  510. direction along the path between two servers, but assuming the intrinsic
  511. frequency errors of the two clocks are relatively small, let d0 and c0
  512. represent the delay and offset when no other traffic is present on the
  513. path and so represents the best estimates of the true values. The
  514. problem is to accurately estimate d0 and c0 from a sample population of
  515. di and ci collected under typical conditions and varying levels of
  516. network load.
  517.  
  518. Figure 5<$&fig3> shows a typical scatter diagram for the path under
  519. study, in which the points (di, ci) are concentrated near the apex of a
  520. wedge defined by lines extending from the apex with slopes
  521. <F128M>æ<F255D>0.5, corresponding to the locus of points as the delay in
  522. one direction increases while the delay in the other direction does not.
  523. From these data it is obvious that good estimators for (d0, c0) are
  524. points near the apex and that the best offset samples occur at the lower
  525. delays. Therefore, an appropriate technique is simply to select from the
  526. n most recent samples the sample with lowest delay and use its
  527. associated offset as the estimate. This is the basis of the clock filter
  528. shown in Figure 2 and the NTP Version 2 algorithm described in detail in
  529. [16].
  530.  
  531. Figure 6<$&fig4> shows the raw time-offset series for the path under
  532. study over a six-day interval, in which occasional errors up to several
  533. seconds are apparent. Figure 7<$&fig5> shows the time-offset series
  534. produced by the filtering algorithm, in which the large errors have been
  535. dramatically reduced. Finally, the overall performance of the path is
  536. apparent from the error distributions shown in Figure 8<$&fig6>. The
  537. upper line shows the distribution for the raw data, while the lower line
  538. shows the filtered data. The significant facts apparent from the latter
  539. line are that the median error over all samples was only a few
  540. milliseconds, while the maximum error was no more than 50 ms.
  541.  
  542. @HEAD LEVEL 2 =  Effects due to Other Processing Algorithms
  543.  
  544. Precision timekeeping requires an exceptionally stable local oscillator
  545. reference in order to deliver accurate time when the synchronization
  546. path to a primary server has failed. Furthermore, the oscillator and
  547. control loop must maintain accurate time and stable frequency over wide
  548. variations in synchronization path delays. For instance, in order to
  549. maintain time to within a millisecond per day without outside reference,
  550. the local oscillator frequency must maintain stability to within .01 ppm
  551. or better.
  552.  
  553. Stabilities of this order usually require a relatively expensive oven-
  554. compensated quartz oscillator, which is not a common component in
  555. everyday computer systems. The NTP local clock model uses an adaptive-
  556. parameter, type-II, phase-locked loop (PLL), which continuously corrects
  557. local oscillator phase and frequency variations relative to updates
  558. received from the network or radio clock. The (open-loop) transfer
  559. function is
  560.  
  561. @CENTER = <$EF(s)~=~{ omega sub c sup 2 } over { s sup 2 tau sup 2
  562. }~(1~+~{ s tau } over { omega sub z})> ,
  563.  
  564. where <$Eomega sub c> is the gain (crossover frequency), <$Eomega sub z>
  565. the corner frequency of the lead network (necessary for PLL stability),
  566. and <$Etau> is a parameter used for bandwidth control.
  567.  
  568. Bandwidth control is necessary to match the PLL dynamics to varying
  569. levels of timing noise due to the intrinsic stability of the local
  570. oscillator and the prevailing path delays in the network. On one hand,
  571. the loop must track uncompensated board-mounted crystals found in common
  572. computing equipment, where the frequency tolerance may be only .01
  573. percent and can vary several ppm as the result of normal room
  574. temperature changes. On the other hand, after the frequency errors have
  575. been tracked for several days, and assuming the local oscillator can be
  576. stabilized accordingly, the loop must maintain stabilities to the order
  577. of .01 ppm. The NTP PLL is designed to adapt automatically to these
  578. regimes by measuring the sample variance and adjusting <$Etau> over a
  579. 16-fold range.
  580.  
  581. In order to assess how closely the NTP PLL meets these objectives, the
  582. experiment described in Section 3.1 above was repeated, but with the
  583. local clock of the experiment host derived from a precision quartz
  584. oscillator. The offsets measured between each of the six primary servers
  585. and the experiment host were collected and processed by a simulator that
  586. duplicates the NTP processing algorithms. However, in addition to the
  587. algorithms described in [16], which select a subset of quality clocks
  588. and from them a single clock as the synchronization source, an
  589. experimental clock-combining method involving a weighted average of
  590. offsets from all selected clocks was used. In principle, such methods
  591. can reduce the effect of systematic offsets shown in Table 2 [2].
  592. However, these methods can also significantly increase the sample
  593. variance presented to the PLL and thus reduce the local-clock stability
  594. below acceptable levels. Thus, the experiment represents a worst-case
  595. scenario.
  596.  
  597. Figure 9<$&fig7> shows the frequency error distribution produced by the
  598. simulator using offset samples collected from all six primary servers
  599. over a four-week period. The results show that the maximum frequency
  600. error over the entire period from all causes is less than .02 ppm, or a
  601. couple of milliseconds per day. During this period there were several
  602. instances where other servers failed and where severe congestion on some
  603. network paths caused weighting factors to change in dramatic ways and
  604. <$Etau> to be adjusted accordingly. Figure 9 may thus represents the
  605. bottom line on system performance at the present level of NTP technology
  606. refinement.
  607.  
  608. @HEAD LEVEL 1 =  Accuracy and Stability of Radio Synchronization
  609.  
  610. In order to assess the overall system synchronization accuracy relative
  611. to UTC, it is necessary to consider the inherent accuracy, stability and
  612. precision of the radio propagation paths and radio clocks themselves.
  613. All of the radio clocks used in the surveys have a design precision
  614. within one millisecond and are potentially accurate to within a
  615. millisecond or two relative to the propagation medium. However, the
  616. absolute accuracy depends on knowledge of the radio propagation path to
  617. the source of standard time and frequency. In addition, the radio clocks
  618. themselves can be a source of random and systematic errors.
  619.  
  620. @HEAD LEVEL 2 =  Estimation of Propagation Delays
  621.  
  622. An evaluation of the timekeeping accuracy of the NTP primary servers
  623. relative to national standards in principle requires calibration by a
  624. portable atomic clock; however, in the absence of a portable clock, the
  625. propagation delay can be estimated for the great-circle path between the
  626. known geographic coordinates of the transmitter and receiver. However,
  627. this can result in errors as large as two milliseconds when compared to
  628. the actual oblique ray path. Additional errors can be introduced by
  629. unpredictable latencies in the radio clocks, operating system, hardware
  630. and in the protocol software (e.g., encryption delays) for NTP itself.
  631.  
  632. It is possible to estimate the timekeeping accuracy by means of a
  633. detailed analysis of the radio propagation path itself. In the case of
  634. the WWVB and MSF services on 60 kHz, the variations in path delay are
  635. relatively well understood and limited to the order of 50 microseconds
  636. [5]. In the case of the GOES service the accuracy is limited by the
  637. ability to accurately estimate the distance along the line-of-sight path
  638. to the satellite and the ability to maintain accurate stationkeeping in
  639. geosynchronous orbit. In principle, the estimation errors for either of
  640. these services is small compared to the accuracy usually expected of
  641. Internet timestamps generated with NTP.
  642.  
  643. However, in the case of the WWV/H and CHU services, which operate on HF
  644. frequencies from 2.5 through 20 MHz, radio propagation is determined by
  645. the upper ionospheric layers, which vary in height throughout the day
  646. and night, and by the geometric ray path determined by the maximum
  647. usable frequency (MUF) and other factors, which also vary throughout the
  648. day, season and phase of the 11-year sunspot cycle.
  649.  
  650. In an effort to calibrate how these effects affect the limiting accuracy
  651. of the NTP primary servers using WWV/H and CHU services, existing
  652. computer programs were used to determine the maximum usable frequency
  653. (MUF) and propagation geometry for typical ionospheric conditions
  654. forecast for January 1990 on the 2476-km path between Newark, DE, and
  655. Fort Collins, CO, by two-hour intervals. The results, shown in Table
  656. 3<$&tab3>, assume a smoothed sunspot number (SSN) of 194 and include the
  657. time interval (UTC hour), MUF (MHz) and delay (ms) for frequencies from
  658. 2.5 through 20 MHz. In case no propagation path is likely, the delay
  659. entry is left blank. The delay itself is followed by a code indicating
  660. whether the path is entirely in sunlight (j), in darkness (n) or mixed
  661. (x) and the number of hops. A symbol (m) indicates two or more geometric
  662. paths are likely with similar amplitudes, which may result in multipath
  663. fading and unstable indications.
  664.  
  665. From Table 3 it can be seen that the delay decreases as the controlling
  666. ionospheric layer (F2) falls during the night (to about 250 km) and
  667. rises during the day (to about 350 km). The delay also changes when the
  668. number of hops and thus the oblique ray geometry changes. The maximum
  669. delay variation for this particular path is from 8.6 to 9.7 ms, a
  670. variation of 1.1 ms. While this variation represents a typical scenario,
  671. other scenarios have been found where the variations exceed two
  672. milliseconds. These results demonstrate that the ultimate accuracy of
  673. HF-radio derived NTP time may depend on the ability to accurately
  674. estimate the propagation path variations or to confine observations to
  675. the same time each day.
  676.  
  677. @HEAD LEVEL 2 =  Accuracy and Stability of Radio Clocks
  678.  
  679. The final experiment reported in this paper involves an assessment of
  680. the accuracy and stability of a commercial WWV/H radio clock under
  681. typical propagation conditions. In order to separate these effects from
  682. those due to the measurement host, the local clock was derived from a
  683. precision oven-compensated quartz oscillator with rated stability of
  684. <F128M>æ<F255D>5x10-9 per day and aging rate of 1x10-9 per day. The
  685. oscillator was set to within about <F128M>æ<F255D>1x10-8 relative to the
  686. 20-MHz WWV transmission under good propagation conditions near midday at
  687. the midpoint of the propagation path. The offsets of the radio clock
  688. relative to the local clock were filtered and processed by the NTP
  689. algorithms (open loop) and then recorded at 30-second intervals for a
  690. period of about two weeks.
  691.  
  692. The results of the experiment are shown in Figure 10<$&fig8> and Figure
  693. 11<$&fig9>. Figure 10 shows the estimated frequency error by intervals
  694. for the entire period and reveals a frequency stability generally within
  695. .05 ppm, except for occasional periods where apparent phase hits cause
  696. the indications to surge. The times of these surges are near times when
  697. the path MUF between the transmitter and receiver is changing rapidly
  698. (see Table 3) and the receiver must change operating frequency to match.
  699. An explanation for the surges is evident in Figure 11, which shows the
  700. measured offsets during an interval including a typical surge. The
  701. figure shows a negative phase excursion of about 10 ms near the time the
  702. MUF would ordinarily fall in the evening and a similar positive
  703. excursion near the time the MUF would ordinarily rise in the morning.
  704.  
  705. Since the phase excursions are far beyond those expected due to
  706. ionospheric effects alone, the most likely explanation is that the
  707. increased noise in received WWV/H signals near the time of MUF-related
  708. frequency changes destabilizes the signal processing algorithms
  709. resulting in incorrect signal tracking. This particular problem has not
  710. been observed with WWVB or GOES radio clocks.
  711.  
  712. @HEAD LEVEL 1 =  Conclusions
  713.  
  714. Over the years it has become something of a challenge to discover and
  715. implement architectures, algorithms and protocols which deliver
  716. precision time in a statistically rambunctious Internet. In perspective,
  717. for the ultimate accuracy in frequency and time transfer, navigation
  718. systems such as LORAN-C, OMEGA and GPS, augmented by portable atomic
  719. clocks, are the preferred method. On the other hand, it is of some
  720. interest to identify the limitations and estimate the magnitude of
  721. timekeeping errors using NTP and typical Internet hosts and network
  722. paths. This paper has identified some of what are believed to be the
  723. major limitations in accuracy and measured their effects in large-scale
  724. experiments involving major portions of the Internet.
  725. The results demonstrated in this paper suggest several improvements that
  726. can be made in subsequent versions of the protocol and hardware/software
  727. implementations, such as improved radio clock designs, improved timebase
  728. hardware, at least at the primary servers, improved frequency-estimation
  729. algorithms and more diligent monitoring of the synchronization subnet.
  730. When a sufficient number of these improvements mature, NTP Version 3 may
  731. appear.
  732.  
  733. @HEAD LEVEL 1 =  References
  734.  
  735. @INDENT HEAD = 1.
  736.  
  737. @INDENT = Allan, D.W., J.H. Shoaf and D. Halford. Statistics of time and
  738. frequency data analysis. In: Blair, B.E. (Ed.). Time and Frequency
  739. Theory and Fundamentals. National Bureau of Standards Monograph 140,
  740. U.S. Department of Commerce, 1974, 151-204.
  741.  
  742. @INDENT HEAD = 2.
  743.  
  744. @INDENT = Allan, D.W., J.E. Gray and H.E. Machlan. The National Bureau
  745. of Standards atomic time scale: generation, stability, accuracy and
  746. accessibility. In: Blair, B.E. (Ed.). Time and Frequency Theory and
  747. Fundamentals. National Bureau of Standards Monograph 140, U.S.
  748. Department of Commerce, 1974, 205-231.
  749.  
  750. @INDENT HEAD = 3.
  751.  
  752. @INDENT = Bertsekas, D., and R. Gallager. Data Networks. Prentice-Hall,
  753. Englewood Cliffs, NJ, 1987.
  754.  
  755. @INDENT HEAD = 4.
  756.  
  757. @INDENT = Beser, J., and B.W. Parkinson. The application of NAVSTAR
  758. differential GPS in the civilian community. Navigation 29, 2 (Summer
  759. 1982).
  760.  
  761. @INDENT HEAD = 5.
  762.  
  763. @INDENT = Blair, B.E. Time and frequency dissemination: an overview of
  764. principles and techniques. In: Blair, B.E. (Ed.). Time and Frequency
  765. Theory and Fundamentals. National Bureau of Standards Monograph 140,
  766. U.S. Department of Commerce, 1974, 233-313.
  767.  
  768. @INDENT HEAD = 6.
  769.  
  770. @INDENT = Cole, R., and C. Foxcroft. An experiment in clock
  771. synchronisation. The Computer Journal 31, 6 (1988), 496-502.
  772.  
  773. @INDENT HEAD = 7.
  774.  
  775. @INDENT = Defense Advanced Research Projects Agency. Internet Control
  776. Message Protocol. DARPA Network Working Group Report RFC-792, USC
  777. Information Sciences Institute, September 1981.
  778.  
  779. @INDENT HEAD = 8.
  780.  
  781. @INDENT = Frank, R.L. History of LORAN-C. Navigation 29, 1 (Spring
  782. 1982).
  783.  
  784. @INDENT HEAD = 9.
  785.  
  786. @INDENT = Gusella, R., and S. Zatti. The Berkeley UNIX 4.3BSD time
  787. synchronization protocol: protocol specification. Technical Report
  788. UCB/CSD 85/250, University of California, Berkeley, June 1985.
  789.  
  790. @INDENT HEAD = 10.
  791. @INDENT = Kopetz, H., and W. Ochsenreiter. Clock synchronization in
  792. distributed real-time systems. IEEE Trans. Computers C-36, 8 (August
  793. 1987), 933-939.
  794.  
  795. @INDENT HEAD = 11.
  796.  
  797. @INDENT = Mills, D.L. DCN local-network protocols. DARPA Network Working
  798. Group Report RFC-891, M/A-COM Linkabit, December 1983.
  799.  
  800. @INDENT HEAD = 12.
  801.  
  802. @INDENT = Mills, D.L. Algorithms for synchronizing network clocks. DARPA
  803. Network Working Group Report RFC-956, M/A-COM Linkabit, September 1985.
  804.  
  805. @INDENT HEAD = 13.
  806.  
  807. @INDENT = Mills, D.L. Experiments in network clock synchronization.
  808. DARPA Network Working Group Report RFC-957, M/A-COM Linkabit, September
  809. 1985.
  810.  
  811. @INDENT HEAD = 14.
  812.  
  813. @INDENT = Mills, D.L. Network Time Protocol (version 1) specification
  814. and implementation. DARPA Network Working Group Report RFC-1059,
  815. University of Delaware, July 1988.
  816.  
  817. @INDENT HEAD = 15.
  818.  
  819. @INDENT = Mills, D.L. The fuzzball. Proc. ACM SIGCOMM 88 Symposium (Palo
  820. Alto, CA, August 1988), 115-122.
  821.  
  822. @INDENT HEAD = 16.
  823.  
  824. @INDENT = Mills, D.L. Network Time Protocol (version 2) specification
  825. and implementation. DARPA Network Working Group Report RFC-1119,
  826. University of Delaware, September 1989.
  827.  
  828. @INDENT HEAD = 17.
  829.  
  830. @INDENT = Mills, D.L. Measured performance of the Network Time Protocol
  831. in the Internet system. DARPA Network Working Group Report RFC-1128,
  832. University of Delaware, October 1989.
  833.  
  834. @INDENT HEAD = 18.
  835.  
  836. @INDENT = Mills, D.L. Internet time synchronization: the Network Time
  837. Protocol. DARPA Network Working Group Report RFC-1129, University of
  838. Delaware, October 1989.
  839.  
  840. @INDENT HEAD = 19.
  841.  
  842. @INDENT = Mitra, D. Network synchronization: analysis of a hybrid of
  843. master-slave and mutual synchronization. IEEE Trans. Communications COM-
  844. 28, 8 (August 1980), 1245-1259.
  845.  
  846. @INDENT HEAD = 20.
  847.  
  848. @INDENT = Mockapetris, P. Domain names - concepts and facilities. DARPA
  849. Network Working Group Report RFC-1034, USC Information Sciences
  850. Institute, November 1987.
  851.  
  852. @INDENT HEAD = 21.
  853.  
  854. @INDENT = Time and Frequency Dissemination Services. NBS Special
  855. Publication 432, U.S. Department of Commerce, 1979.
  856. @INDENT HEAD = 22.
  857.  
  858. @INDENT = Postel, J. Daytime protocol. DARPA Network Working Group
  859. Report RFC-867, USC Information Sciences Institute, May 1983.
  860.  
  861. @INDENT HEAD = 23.
  862.  
  863. @INDENT = Postel, J. Time protocol. DARPA Network Working Group Report
  864. RFC-868, USC Information Sciences Institute, May 1983.
  865.  
  866. @INDENT HEAD = 24.
  867.  
  868. @INDENT = Su, Z. A specification of the Internet protocol (IP) timestamp
  869. option. DARPA Network Working Group Report RFC-781. SRI International,
  870. May 1981.
  871.  
  872. @INDENT HEAD = 25.
  873.  
  874. @INDENT = Vass, E.R. OMEGA navigation system: present status and plans
  875. 1977-1980. Navigation 25, 1 (Spring 1978).
  876.